﻿<%@ Page Title="ADMINISTRAR PERMISO" Language="vb" AutoEventWireup="false" MasterPageFile="~/01ADMINISTRADOR/MPAdmin.Master" CodeBehind="admin-permiso.aspx.vb" Inherits="ASI_2_UFG.admin_permiso" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="tableform">
        <fieldset><legend>Administrar Aulas</legend></fieldset>
        <table>
        <tr>
                <td>
                    <asp:Label ID="Label6" runat="server" Text="ID"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtID" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="PAGINA"></asp:Label></td>
                <td>
                    <asp:SqlDataSource ID="SQLPagina" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT [id_pagina], [nombre] FROM [PAGINA]"></asp:SqlDataSource>
                    <asp:DropDownList ID="dropPagina" runat="server" DataSourceID="SQLPagina" 
                        DataTextField="nombre" DataValueField="id_pagina">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="ROL"></asp:Label></td>
                <td>
                    <asp:SqlDataSource ID="SQLRol" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT [id_rol], [nombre] FROM [ROL]"></asp:SqlDataSource>
                    <asp:DropDownList ID="DropRol" runat="server" DataSourceID="SQLRol" 
                        DataTextField="nombre" DataValueField="id_rol">
                    </asp:DropDownList>
                </td>
            </tr>
                        
            <tr>
                <td colspan="2">
                    <asp:ImageButton ID="btnInsertar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_add.png" />
                    <asp:ImageButton ID="btonModificar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_refresh.png" />
                    <asp:ImageButton ID="btonEliminar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_delete.png"/>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lbMensaje" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:SqlDataSource ID="SQLGridPermiso" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT p.id_permiso AS ID, pa.nombre AS PAGINA, ro.nombre AS ROL FROM PERMISO AS p, PAGINA AS pa, ROL AS ro WHERE p.id_pagina = pa.id_pagina AND p.id_rol = ro.id_rol"></asp:SqlDataSource>
                    <asp:GridView ID="GridPermiso" runat="server" CellPadding="4" 
                        DataSourceID="SQLGridPermiso" ForeColor="#333333" GridLines="None">
                        <RowStyle BackColor="#EFF3FB" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
